package net.lab1024.sa.admin.module.system.config;

import net.lab1024.sa.admin.module.system.config.domain.SystemConfigEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface SystemConfigDao {

    /** 根据key的前缀查询 */
    List<SystemConfigEntity> getByKeyPrefix(@Param("keyPrefix") String keyPrefix);

    /** 批量新增，存在则更新 */
    void insertBatchKeys(@Param("entityList") List<SystemConfigEntity> entityList);

    /** 根据key获取值 */
    String getValueByKey(@Param("key") String key);
}
